Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.11 #1117

Merged
merged 13 commits into from
May 15, 2024
Merged

v4.11 #1117

merged 13 commits into from
May 15, 2024

Conversation

ankitsmt211
Copy link
Member

Features:

Bugfixes:

platform:

PRs:

nateweisz and others added 13 commits April 13, 2024 23:33
* wip: initial commit

* style(spotlessApply): run uncalled task

* fix: register routine in features list

* feat: update config.json.template

* wip(rss-config): change config design

* feat: make targetChannelPattern into a Map

* refactor: don't hardcode number

* feat: improve constructEmbedMessage

* feat: improve the description constructing

* feat: increase MAX_CONTENTS to 300

* wip: changes

* feat(rss-feed): convert polling interval to be configurable

* feat: improve date parsing

Co-authored-by: Ethan McCue <[email protected]>

* feat: update config.json.template

* feat: improve date handling and add embed timestamp

* fix: malformed `config.json.template`

* fix: now correctly finds the latest date

* feat: improve date handling and add embed timestamp

* fix: now correctly finds the latest date

* feat: you can now optionally declare a specific channel for a feed to go to

* finished javadoc todos

* improved embed

* feat(rss-routine): working version

- Added JavaDocs on most parts
- Simplified the code and cleaned up unused stuff

* feat(rss-routine): increase MAX_CONTENTS to 1000

* refactor(rss-routine): rename to RSSHandlerRoutine

While the original idea was to add a Java news and changes RSS feed,
this was expanded to all types of RSS feeds, so a more appropriate name
makes things more clear.

* docs(rss-routine): add JavaDocs for constructor and class

* feat: add @NotNull annotation

* Update RSSHandlerRoutine.java

* fix: reverse feed so it posts in correct order

* refactor: use variable types instead of var

* feat: use fetchAny() instead of fetch()

* fix(rss-handler): remove redundant empty check

Co-authored-by: Ethan McCue <[email protected]>

* refactor(rss-handler): remove AtomicReference usage

Co-authored-by: Ethan McCue <[email protected]>

* resolve a couple issues

* refactor(rss): switch to using a record for the config

* feat: rename to fallbackChannelPattern

* refactor: remove unnecessary throws exception in method signature

* docs: add a few missing parameters and fix typos

* refactor: reduce try-catch scope and added clarifying comment

* perf: use Stream instead of StringBuilder

* refactor: put fallback case into an else statement

* refactor: switch to Map#containsKey() for targetChannelPatterns

* feat: modularize sendRss() method and improve variable names

This also changes the functionality of how new RSS feeds get dealt with
for the first time. Before this commit, all items would get posted as
embeds on Discord, and as a result, that would bombard the target
channel with RSS posts once the routine executes.

This commit changes this behavior by assuming that all RSS posts have
been posted and it should only consider posting posts newer than the
registered date.

* refactor: remove star import

* fix: add Objects#requireNonNull() on rssConfig

* changes

* feat: improvements from code reviews

Co-authored-by: Nathan Weisz <[email protected]>

* feat: add DateTimeParseException in signature

* refactor: use .orElseThrow() instead of .get()

* fixed missing coma after rss configuration

Co-authored-by: Tanish <[email protected]>

* fix(rss): feeds support multiple channels
fix(rss): polling interval is now clear on unit of time
fix(rss): posting messages now uses forEachOrdered

* Optional<List<TextChannel>> -> List<TextChannel>

* extract item post predicate to seperate function

* various changes from null to optional

---------

Co-authored-by: christolis <[email protected]>
Co-authored-by: Ethan McCue <[email protected]>
Co-authored-by: Tanish <[email protected]>
working config for RSS feed that fits majority of users
chore: add safety checks to NoteCommand
* chore: rename ban history options to be clearer
* chore: update ban command period description
This commit attempts to change the way a text channel list for RSS feeds
gets generated, as it would originally not consider any channels that
matched the fallback channel pattern and it would constantly log a
warning that would clutter the log channels and skip sending any RSS
posts as a result.

The method which is responsible for finding the text channels from a
given RSS feed configuration now focuses on collecting a list of text
channels that match the target channel pattern from the configuration,
and if no channels are found, the same collection attempt happens with
the fallback channel pattern. In case an empty list is still yielded, a
now-improved and more accurate warning message gets logged.
chore: remove star imports (resolves #1057)
* using a better method to retrieve start message for thread

* replace retrieveMessageById with getStartMessage on threadChannel channel type
* title generation by ChatGPT for transfer-questions command

refactoring

reviewer comments addressed

prompt improved

Update prompt

Co-authored-by: alphaBEE <[email protected]>

removed tags

* refactor prompt message for better titles

---------

Co-authored-by: alphaBEE <[email protected]>
Thread creation flow is more clear and optimized by removing unnecessary calls to discord API
@ankitsmt211 ankitsmt211 added the release Marks official releases and talks about them, i.e. merges from develop to master label May 15, 2024
@ankitsmt211 ankitsmt211 requested a review from a team as a code owner May 15, 2024 16:19
Copy link

sonarcloud bot commented May 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ankitsmt211 ankitsmt211 merged commit d3a19aa into master May 15, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Marks official releases and talks about them, i.e. merges from develop to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants